// 编写测试类 ComputerMachineTest
public class ComputerMachineTest {
    public static void main(String[] args) {
        // 计算算术平均数
        ComputerMachine.getAverage(new ComputerAverage() {
            @Override
            public double average(double number1, double number2) {
                return (number1 + number2) / 2;
            }
        }, 10, 20);

        // 计算几何平均数
        ComputerMachine.getAverage(new ComputerAverage() {
            @Override
            public double average(double number1, double number2) {
                return Math.sqrt(number1 * number2);
            }
        }, 10, 20);
    }
}
